<!-- The template to display files available for download -->
<script id="template-download" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
    <tr class="template-download fade">
        {% if (file.error) { %}
            <td></td>
            <td class="name"><span>{%=file.name%}</span></td>
            <td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
        {% } else { %}
            <td class="preview">{% if (file.thumbnail_url) { %}
                <a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img style="width:33px;height:33px;" src="{%=file.thumbnail_url%}"></a>
            {% } %}</td>
            <td class="name">
                <a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a>
            </td>
              
            <td colspan="2"><input id="Reviews[anonymImg][{%=file.thumbnail_url.match(/[a-z0-9]+.[a-z]{3}$/)%}]" type="checkbox" value="1" name="Reviews[anonymImg][{%=file.thumbnail_url.match(/[a-z0-9]+.[a-z]{3}$/)%}]"/> <label for="Reviews[anonymImg][{%=file.thumbnail_url.match(/[a-z0-9]+.[a-z]{3}$/)%}]" class="checkbox"> Показать только модератору</label></td>
        {% } %}
        <td class="delete">
            <button class="delete_photo_but" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">
            </button>
            <input type="hidden" name="delete" value="1">
            
        </td>
    </tr>
{% } %})
</script>